<?php
/**
 * Class 个人中心.
 * User: chan
 * Date: 2017/10/20 11:22
 */

namespace app\api\controller;
class Address extends Base
{
    //检查权限作用域
    protected $beforeActionList  = [
        'checkPrimaryScope' => [
            'except' => 'except'
        ],
    ];

    /**
     * 收货地址列表
     */
    public function address_list()
    {
        $result =  (new \app\api\logic\Address())->address_list();
        return $this->ajaxReturn($result);
    }

    /**
     * 添加修改收货地址
     */
    public function address_edit()
    {
        $result =  (new \app\api\logic\Address())->address_edit();
        return $this->ajaxReturn($result);
    }

    /**
     * 设置默认收货地址
     */
    public function address_setdefault()
    {
        $result =  (new \app\api\logic\Address())->address_setdefault();
        return $this->ajaxReturn($result);
    }

    /**
     * 删除收货地址
     */
    public function address_del()
    {
        $result =  (new \app\api\logic\Address())->address_del();
        return $this->ajaxReturn($result);
    }
}